<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>

</body>

</html>
<script>
    class Student {
        constructor(n, a) {
            this.name = n;
            this.age = a;
        }
        say() {
        let str = `我是${this.name}，今年${this.age}了`
            return str 
        }

        show = () => {
            let arr1 = [1,2,3,4,5];
            let arr2 = [...arr1];
            console.log(arr2);
        }

    }
    let syd = new Student('狗东',180);
    console.log(syd);
    console.log(syd.say());
    syd.show();
</script>